package com.dailyblue.example.project.bookstore.book.feign;

import com.dailyblue.example.project.bookstore.book.feign.impl.CategoryFeignFallback;
import com.dailyblue.example.project.bookstore.commons.bean.Category;
import com.dailyblue.example.project.bookstore.commons.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "bookstore-category",fallback = CategoryFeignFallback.class)
public interface CategoryFeign {
    @GetMapping("/category/id/{id}")
    JsonResult<Category> find(@PathVariable("id") String id);
}
